package zjut.raymond.collectorplus.util;


/**
 * Api code
 *
 * @author Raymond
 * @Description TODO
 * @date 2021 /6/15-9:36
 */

public enum ApiCode {
    /**
     * Success api code
     * 成功
     */
    SUCCESS(200, "请求成功"),
    /**
     * Fail api code: 失败
     */
    FAIL(400, "请求失败"),
    /**
     * Not found api code : 接口不存在
     */
    NOT_FOUND(404, "接口不存在"),
    /**
     * Internal server error api code: 服务器内部错误
     */
    INTERNAL_SERVER_ERROR(500, "服务器内部错误");
    /**
     * Code
     */
    private Integer code;
    private String message;

    /**
     * Api code
     *
     * @param code code
     */
    ApiCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}